<%@page import="Easy.table.Users"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Pocketing 
Description: A two-column, fixed-width design with dark color scheme.
Version    : 1.0
Released   : 20130128

-->
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/user.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Pocketing</title>
<!-- InstanceEndEditable -->
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="css/datePicker.css" />
        <script src="javaScript/date.js"></script>
        <script src="javaScript/min.js"></script>
        <script src="javaScript/validate.js"></script>
        <script src="javaScript/additional.js"></script>
        <script>
            $(function() {
                $( "#datepicker" ).datepicker({
                    changeMonth: true,
                    changeYear: true
                });
            });
        </script>
<!--[if IE 6]>
<link href="default_ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
<img src="images/fotogrph-billiards-153875273 (1).jpg" width="1500" height="1000" alt="" id="full-screen-background-image" />
<div id="wrapper">
  <div id="header-wrapper">
    <div id="header" class="container">
      <div id="logo">
        <h1><a href="#">Home</a></h1>
      </div>
      <div id="menu">
        <ul>
          <li><a href="#" accesskey="1" title="">Events</a></li>
          <li><a href="#" accesskey="2" title="">Promotion</a></li>
          <li><a href="#" accesskey="3" title="">Faqs</a></li>
          <li><a href="#" accesskey="4" title="">About Us</a></li>
          <li><a href="#" accesskey="5" title="">Contact Us</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div id="page" class="container"><!-- InstanceBeginEditable name="EditRegion1" -->
    <div id="content">
      <div id="box1">
        <h2 class="title"><a href="#">Welcome to Easy ticket</a></h2>
      </div>
      <div>
        <ul class="style1">
          <li class="first">
            <table border="0" cellspacing="6" cellpadding="6">
                                    <form action="ProcessServlet" method="post">
                                        <%
                                        Users user1 = null;
                                            if(session.getAttribute("UserInfo")==null){
                                                request.getRequestDispatcher("login.jsp").forward(request, response);
                                                }else{
                                                    user1 = (Users)session.getAttribute("UserInfo");
                                                    }
                                        %>
                                        <tbody>
                                            <tr>
                                                <th>Username: <input type="hidden" name="txtID" value="<%= user1.getUserID() %>"/></th>
                                                <th><input type="text" name="txtUsername" value="<%= user1.getUsername() %>" disabled/></th>
                                            </tr>
                                            <tr>
                                                <td>Full Name: </td>
                                                <td><input type="text" name="txtName" value="<%= user1.getName() %>"/></td>
                                            </tr>
                                            <tr>
                                                <td>Day of Birth: </td>
                                                <td><input type="text" id ="datepicker" name="txtDoB" value="<%= user1.getDayOfBirth() %>"/></td>
                                            </tr>
                                            <tr>
                                                <td>Address: </td>
                                                <td><input type="text" name="txtAddress" value="<%= user1.getAddress() %>"/></td>
                                            </tr>
                                            <tr>
                                                <td>Phone: </td>
                                                <td><input type="text" name="txtPhone" value="<%= user1.getPhone() %>"/></td>
                                            </tr>
                                            <tr>
                                                <td>Email: </td>
                                                <td><input type="text" name="txtEmail" value="<%= user1.getEmail() %>"/></td>
                                            </tr>
                                            <tr>
                                                <td><input type="submit" class="button-style" name="action" value="Update"/></td>
                                            </tr>
                                        </tbody>
                                    </form>
                                </table>
          </li>
        </ul>
      </div>
    </div>
    <!-- InstanceEndEditable -->
    <div id="sidebar">
      <h2>Account</h2>
      <ul class="style3">
        <li class="first">
          <p></p>
           <%
                                        String text = "";
                                        String link = "";
                                        Users user = null;
                                            if(session.getAttribute("UserInfo")==null){
                                                link = "login.jsp";
                                                text = "Login";
                                                }else{
                                                	user = (Users)session.getAttribute("UserInfo");
                                                    link = "account.jsp";
                                                    text = "Welcome, "+user.getUsername();
                                                 }
                                        %>
             <a href="<%= link %>">                       
            <h3><%= text %></h3>
            </a>
            
          
         
            
            <% 
            if(session.getAttribute("UserInfo")!=null){
            %>
            <form action="ProcessServlet" method="post">
            	<input type="submit" name="action" value="logout" class="button-style"/>
                </form>
                <li class="first">
          <a href="shoppingCart.jsp">
            <h3>My cart</h3>
          </a>
          <p></p>
        </li>
        <li class="first">
          <a href="oldOrder.jsp">
            <h3>View Old Order</h3>
          </a>
          <p></p>
        </li>
                 
             <%
            }else{ 
            %>
          <p></p>
       
        </li>
        <li class="first">
          <p></p>
          <a href="register.jsp">
            <h3>Register</h3>
          </a>
          <p></p>
        </li>
        <%
        }
        %>
      </ul>
      <h2>Categories</h2>
      <ul class="style3">
        <li class="first">
          <p></p>
          <a href="#">
            <h3>Movies</h3>
          </a>
          <p></p>
        </li>
        <li>
          <p></p>
          <a href="#">
            <h3>Music show</h3>
          </a>
          <p></p>
        </li>
        <li>
          <p></p>
          <a href="#">
            <h3>Sport</h3>
          </a>
          <p></p>
        </li>
        <li>
          <p></p>
          <a href="#">
            <h3>Drama</h3>
          </a>
          <p></p>
        </li>
      </ul>
    </div>
  </div>
  <div id="footer">
    <p>Copyright (c) 2013 EasyTicket. All rights reserved. Design by Group04</p>
  </div>
</div>
</body>
<!-- InstanceEnd --></html>
